// 搜索配置
const searchModelJson = [];
// 页面操作按钮配置
const fucDataJson = [
  {
    name: "导出",
    type: "danger",
    icon: "el-icon-position",
  },
];

// 表头配置
const tableColumnJson = [
  {
    label: "单据ID",
    prop: "bm_id",
    tooltip: true,
  },
  {
    label: "单据名称",
    prop: "bm_functionName",
    tooltip: true,
  },
  {
    label: "控制器名",
    prop: "bm_controllerName",
    tooltip: true,
  },
  {
    label: "所属菜单",
    prop: "mc_MenuName",
    tooltip: true,
  },
  {
    label: "编码规则",
    prop: "bm_RuleStr",
    tooltip: true,
  },
  {
    label: "单据类型",
    prop: "typeName",
    tooltip: true,
  },
  {
    label: "功能描述",
    prop: "bm_functionExplain",
    tooltip: true,
  },
  {
    label: "创建人",
    prop: "createPersonName",
    tooltip: true,
  },
  {
    label: "创建时间",
    prop: "bm_CreateTime",
    tooltip: true,
  },
];
const databaseTableColumn = [
  {
    label: "排序",
    prop: "sort",
    tooltip: true,
    width: 50,
  },
  {
    label: "中文名",
    prop: "tableNameCN",
    tooltip: true,
  },
  {
    label: "英文名",
    prop: "tableNameEN",
    tooltip: true,
  },
  {
    label: "表类型",
    prop: "tableType",
    tooltip: true,
    width: 65,
    stateOption: {
      1: "主表",
      2: "子表",
      3: "孙表",
    },
  },
  {
    label: "显示",
    prop: "showType",
    tooltip: true,
    width: 50,
    stateOption: {
      0: "否",
      1: "是",
    },
  },
  {
    label: "备注",
    prop: "remark",
    tooltip: true,
  },
];
const orderTableColumn = [
  {
    label: "排序",
    prop: "sort",
    tooltip: true,
    width: 60,
  },
  {
    label: "类型",
    prop: "type",
    tooltip: true,
    width: 160,
  },
  {
    label: "格式规则",
    prop: "formart",
    tooltip: true,
    width: 180,
  },
  {
    label: "长度",
    prop: "ruleLength",
    tooltip: true,
  },
];
const fieldTableColumn = [
  {
    label: "排序",
    prop: "sort",
    tooltip: true,
    width: 50,
  },
  {
    label: "字段名",
    prop: "fieldNameEN",
    tooltip: true,
    width: 125,
  },
  {
    label: "中文名",
    prop: "fieldNameCN",
    tooltip: true,
    width: 125,
  },
  {
    label: "字段类型",
    prop: "fieldType",
    tooltip: true,
  },
  {
    label: "长度",
    prop: "fieldTypeLength",
    tooltip: true,
    width: 60,
  },
  {
    label: "显示方式",
    prop: "displayType",
    tooltip: true,
    width: 75,
  },
  {
    label: "数据源",
    prop: "dataSource",
    tooltip: true,
    width: 65,
  },
  {
    label: "必填",
    prop: "isMustFill",
    tooltip: true,
    width: 50,
  },
  {
    label: "显示",
    prop: "isVisible",
    tooltip: true,
    width: 50,
  },
];
// 详情页面结构JSON
const basicFormRow = [
  {
    elCol: [
      {
        label: "单据id",
        prop: "Bm_id",
        tag: "elInput",
        disabled: true,
      },
      {
        label: "控制器名",
        prop: "Bm_controllerName",
        tag: "elInput",
      },
    ],
  },
  {
    elCol: [
      {
        label: "上级菜单",
        prop: "fatherMenuName",
        tag: "elDialog",
      },
      {
        label: "功能名称",
        prop: "Bm_functionName",
        tag: "elInput",
      },
    ],
  },
  {
    elCol: [
      {
        label: "功能介绍",
        prop: "Bm_functionExplain",
        tag: "elInput",
        type: "textarea",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "一行几列",
        prop: "Bm_columnsNumber",
        tag: "elInput",
        rules: true,
        rulesName: "integer",
      },
      {
        prop: "Bm_type",
        tag: "elRadio",
        options: [
          {
            label: "Business",
            value: 1,
          },
          {
            label: "System",
            value: 0,
          },
          {
            label: "Base",
            value: 2,
          },
        ],
      },
    ],
  },
];
// 详情页面结构JSON
// const gnerationFormRow = [{
// 	elCol: [{
// 			label: '单据id',
// 			prop: 'Bm_id',
// 			tag: 'elInput',
// 			disabled: true
// 		},
// 		{
// 			label: '控制器名',
// 			prop: 'Bm_controllerName',
// 			tag: 'elInput',
// 			disabled: true
// 		},
// 	]
// }, {
// 	elCol: [{
// 			label: '上级菜单',
// 			prop: 'fatherMenuName',
// 			tag: 'elInput',
// 			disabled: true
// 		},
// 		{
// 			label: '功能名称',
// 			prop: 'Bm_functionName',
// 			tag: 'elInput',
// 			disabled: true
// 		},
// 	]
// }, {
// 	elCol: [{
// 		label: '功能介绍',
// 		prop: 'gnjs',
// 		tag: 'elInput',
// 		type: 'textarea',
// 		disabled: true,
// 		span: 24
// 	}, ]
// }, {
// 	elCol: [{
// 		label: '一行几列',
// 		prop: 'lengNumber',
// 		tag: 'elInput',
// 		disabled: true
// 	}, {
// 		prop: 'b_Type',
// 		tag: 'elRadio',
// 		disabled: true,
// 		options: [{
// 			label: 'Business',
// 			value: 'Business'
// 		}, {
// 			label: 'System',
// 			value: 'System',
// 		}, {
// 			label: 'Base',
// 			value: 'Base',
// 		}]
// 	}]
// }, ]
const gnerationFormRow = [
  {
    elCol: [
      {
        label: "单据id",
        prop: "Bm_id",
        tag: "elInput",
        disabled: true,
      },
      {
        label: "控制器名",
        prop: "Bm_controllerName",
        tag: "elInput",
        disabled: true,
      },
    ],
  },
  {
    elCol: [
      {
        label: "上级菜单",
        prop: "fatherMenuName",
        tag: "elInput",
        disabled: true,
      },
      {
        label: "功能名称",
        prop: "Bm_functionName",
        tag: "elInput",
        disabled: true,
      },
    ],
  },
  {
    elCol: [
      {
        label: "功能介绍",
        prop: "Bm_functionExplain",
        tag: "elInput",
        type: "textarea",
        span: 24,
        disabled: true,
      },
    ],
  },
  {
    elCol: [
      {
        label: "一行几列",
        prop: "Bm_columnsNumber",
        tag: "elInput",
        rules: true,
        rulesName: "integer",
        disabled: true,
      },
      {
        prop: "Bm_type",
        tag: "elRadio",
        disabled: true,
        options: [
          {
            label: "Business",
            value: 1,
          },
          {
            label: "System",
            value: 0,
          },
          {
            label: "Base",
            value: 2,
          },
        ],
      },
    ],
  },
];

// 数据库表名JSON
const databaseFormRow = [
  {
    elCol: [
      {
        label: "排序",
        prop: "sort",
        tag: "elInput",
        rules: true,
        rulesName: "integer",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "中文名称",
        prop: "tableNameCN",
        tag: "elInput",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "英文名",
        prop: "tableNameEN",
        tag: "elInput",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "表类型",
        prop: "tableType",
        span: 24,
        tag: "elRadio",
        options: [
          {
            label: "主表",
            value: 1,
          },
          {
            label: "子表",
            value: 2,
          },
          {
            label: "孙表",
            value: 3,
          },
        ],
      },
    ],
  },
  {
    elCol: [
      {
        label: "是否显示",
        prop: "showType",
        span: 24,
        tag: "elRadio",
        options: [
          {
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 0,
          },
        ],
      },
    ],
  },
  {
    elCol: [
      {
        label: "备注",
        prop: "remark",
        tag: "elInput",
        type: "textarea",
        span: 24,
      },
    ],
  },
];

const fieldFormRow = [
  {
    elCol: [
      {
        label: "字段类型",
        prop: "fieldType",
        tag: "elSelect",
        options: [],
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "字段名称",
        prop: "fieldNameEN",
        tag: "elInput",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "中文名",
        prop: "fieldNameCN",
        tag: "elInput",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "显示类型",
        prop: "dataType",
        span: 24,
        tag: "elRadio",
        options: [
          {
            label: "文本",
            value: 1,
          },
          {
            label: "日期",
            value: 2,
          },
          {
            label: "下拉",
            value: 3,
          },
          {
            label: "弹窗",
            value: 4,
          },
        ],
      },
    ],
  },
  {
    elCol: [
      {
        label: "数据源",
        prop: "dataSource",
        tag: "elInput",
        type: "textarea",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "排序",
        prop: "sort",
        tag: "elInput",
        span: 24,
      },
    ],
  },
  {
    elCol: [
      {
        label: "是否显示",
        prop: "isVisible",
        span: 24,
        tag: "elRadio",
        options: [
          {
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 0,
          },
        ],
      },
    ],
  },
  {
    elCol: [
      {
        label: "是否必填",
        prop: "isMustFill",
        span: 24,
        tag: "elRadio",
        options: [
          {
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 0,
          },
        ],
      },
    ],
  },
];
const permissionFormRow = [
  {
    elCol: [
      {
        label: "单据id",
        prop: "id",
        tag: "elInput",
        disabled: true,
      },
      {
        label: "单据名称",
        prop: "bm_functionName",
        tag: "elInput",
        disabled: true,
      },
    ],
  },
  {
    elCol: [
      {
        label: "权限字段",
        prop: "ColumnsKey",
        tag: "elInput",
        placeholder: "数据过滤字段",
      },
      {
        label: "字段所属表",
        prop: "ColumnsTable",
        tag: "elInput",
        placeholder: "权限字所在的表或视图",
      },
    ],
  },
  {
    elCol: [
      {
        label: "权限数据源表",
        prop: "PepedomTable",
        tag: "elInput",
        placeholder: "例如表dbo.Sys_Organ",
      },
      {
        label: "数据过滤",
        prop: "Strwhere",
        tag: "elInput",
        placeholder: "例如 and o_O_OrangID > 5",
      },
    ],
  },
  {
    elCol: [
      {
        label: "数据源ID",
        prop: "PepedomID",
        tag: "elInput",
        placeholder: "例如部门IDo_OrangID",
      },
      {
        label: "数据源Name",
        prop: "PepedomName",
        tag: "elInput",
        placeholder: "例如名称o_OrangName",
      },
    ],
  },
];

export default {
  searchModelJson,
  fucDataJson,
  tableColumnJson,
  basicFormRow,
  fieldTableColumn,
  databaseTableColumn,
  databaseFormRow,
  fieldFormRow,
  gnerationFormRow,
  orderTableColumn,
  permissionFormRow,
};
